<template>
  <div class="item" @click="goTo(item.id)">
    <image :src="item.logo" mode=""></image>
    <view>
      <view class="title">店铺名称：{{ item.title }}</view>
      <view class="address">店铺地址： {{ item.address }}</view>
      <view class="time">入驻时间：{{ item.createdDate }}</view>
    </view>
  </div>
</template>

<script lang="ts" setup>
import { set } from '@/utils/uniapi';
interface Item {
  address: string;
  logo: string;
  title: string;
  createdDate: string;
  mchUserId: string;
}
defineProps<{
  item: Item;
}>();
const goTo = (data: any) => {
  set('mchId', data);
  uni.reLaunch({ url: '/pages/my/my' });
};
</script>

<style scoped lang="scss">
.item {
  width: 690rpx;
  display: flex;
  margin: 20rpx auto;
  padding: 20rpx;
  box-sizing: border-box;
  border-radius: 20rpx;
  box-shadow: 0rpx 0rpx 10rpx 10rpx #ccc;
  background-color: #fff;
  align-items: center;
  image {
    width: 200rpx;
    height: 200rpx;
    background-color: #f6f6f6;
    margin-right: 20rpx;
    border-radius: 10rpx;
  }
  .title {
    font-size: 32rpx;
    font-weight: 500;
  }
  .address,
  .time {
    font-size: 26rpx;
    color: #666;
  }
  .title,
  .address,
  .time {
    margin-bottom: 10rpx;
  }
}
</style>
